<h1>Listing sections in issue <%= @current_issue.issue_number %></h1>

<table>
  <tr>
  <% for column in Section.content_columns %>
    <th><%= column.human_name %></th>
  <% end %>
  </tr>
  
<% for section in @sections_in_issue %>
  <tr>
  <% for column in Section.content_columns %>
    <td><%=h section.send(column.name) %></td>
  <% end %>
    <td><%= link_to 'List articles', { :action => 'list_articles_by_section', :id => section}  %></td>
    <td><%= link_to 'Show', :action => 'show_section', :id => section %></td>
    <td><%= link_to 'Edit', :action => 'edit_section', :id => section %></td>
    <td><%= link_to 'Destroy', { :action => 'destroy_section', :id => section }, :confirm => 'Are you sure?' %></td>
  </tr>
<% end %>
</table>


<br />


